package bai5.model;

import java.util.Scanner;

public class Technology {
	private String name;
	private String version;
	private String use;
	public Technology(){
		
	}
	public Technology(String name, String version, String use) {
		super();
		this.name = name;
		this.version = version;
		this.use = use;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getVersion() {
		return version;
	}
	public void setVersion(String version) {
		this.version = version;
	}
	public String getUse() {
		return use;
	}
	public void setUse(String use) {
		this.use = use;
	}
	public Technology inputTechnology(){
		Scanner sc=new Scanner(System.in);
		System.out.println("=====Them moi Technology=====");
		System.out.println("Nhap name: ");
		String name=sc.nextLine();
		while(name.trim().equalsIgnoreCase("")){
			System.out.println("Chua nhap gia tri");
			name=sc.nextLine();
		}
		System.out.println("Nhap version: ");
		String version=sc.nextLine();
		while(version.trim().equalsIgnoreCase("")){
			System.out.println("Chua nhap gia tri");
			version=sc.nextLine();
		}
		System.out.println("Nhap use :");
		String use=sc.nextLine();
		while(use.trim().equalsIgnoreCase("")){
			System.out.println("Chua nhap gia tri");
			use=sc.nextLine();
		}
		Technology tn=new Technology(name,version,use);
		return tn;

	}
	public void display(Technology tn){
		System.out.println("Name: "+name);
		System.out.println("Version: "+version);
		System.out.println("Use: "+use);
	}


}
